YES 0.856
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/Monad.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule Monad
| ((replicateM_ :: Int -> Maybe a -> Maybe ()) :: Int -> Maybe a -> Maybe ()) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM_ :: Monad a => Int -> a b -> a ()
replicateM_ | n x | = | sequence_ (replicate n x) |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Lambda Reductions:
The following Lambda expression
\_→q
is transformed to
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
mainModule Monad
| ((replicateM_ :: Int -> Maybe a -> Maybe ()) :: Int -> Maybe a -> Maybe ()) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM_ :: Monad a => Int -> a b -> a ()
replicateM_ | n x | = | sequence_ (replicate n x) |
|
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule Monad
| ((replicateM_ :: Int -> Maybe a -> Maybe ()) :: Int -> Maybe a -> Maybe ()) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM_ :: Monad b => Int -> b a -> b ()
replicateM_ | n x | = | sequence_ (replicate n x) |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
The following Function with conditions
take | n vx | |
take | vy [] | = [] |
take | n (x : xs) | = x : take (n - 1) xs |
is transformed to
take | n vx | = take3 n vx |
take | vy [] | = take1 vy [] |
take | n (x : xs) | = take0 n (x : xs) |
take0 | n (x : xs) | = x : take (n - 1) xs |
take1 | vy [] | = [] |
take1 | wx wy | = take0 wx wy |
take2 | n vx True | = [] |
take2 | n vx False | = take1 n vx |
take3 | n vx | = take2 n vx (n <= 0) |
take3 | wz xu | = take1 wz xu |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
mainModule Monad
| ((replicateM_ :: Int -> Maybe a -> Maybe ()) :: Int -> Maybe a -> Maybe ()) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM_ :: Monad b => Int -> b a -> b ()
replicateM_ | n x | = | sequence_ (replicate n x) |
|
Let/Where Reductions:
The bindings of the following Let/Where expression
are unpacked to the following functions on top level
repeatXs | xv | = xv : repeatXs xv |
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
mainModule Monad
| ((replicateM_ :: Int -> Maybe a -> Maybe ()) :: Int -> Maybe a -> Maybe ()) |
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM_ :: Monad b => Int -> b a -> b ()
replicateM_ | n x | = | sequence_ (replicate n x) |
|
module Maybe where
| import qualified Monad import qualified Prelude
|
Num Reduction: All numbers are transformed to thier corresponding representation with Pos, Neg, Succ and Zero.
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
mainModule Monad
| (replicateM_ :: Int -> Maybe a -> Maybe ()) |
module Maybe where
| import qualified Monad import qualified Prelude
|
module Monad where
| import qualified Maybe import qualified Prelude
|
| replicateM_ :: Monad b => Int -> b a -> b ()
replicateM_ | n x | = | sequence_ (replicate n x) |
|
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ LetRed
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_foldr(xw5, Succ(xw3000), Just(xw40), h) → new_foldr(xw5, xw3000, Just(xw40), h)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_foldr(xw5, Succ(xw3000), Just(xw40), h) → new_foldr(xw5, xw3000, Just(xw40), h)
The graph contains the following edges 1 >= 1, 2 > 2, 3 >= 3, 4 >= 4